package com.example.rocketmqdemo.message;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName BroadcastCustomer
 * @Description TODO
 * @Author 郭敖
 * @Date 2023年12月07日 23:17
 * @Version 1.0
 */
@Component
@Slf4j
@RocketMQMessageListener(consumerGroup = "group3",messageModel = MessageModel.BROADCASTING,secretKey = "broadcast",topic = "test-topic")
public class BroadcastCustomer implements RocketMQListener {
    @Override
    public void onMessage(Object o) {
      log.info("BroadcastCustomer接受到的广播消息为：${}",o);
    }
}
